package com.fourforfo.fourmall.order.feign;

import com.fourforfo.common.to.SkuInfoAndAttrsTO;
import com.fourforfo.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("fourmall-product")
public interface ProductFeignService {

    @PostMapping("/product/spuinfo/listSpuInfo")
    R listSpuInfoBySkuIds(@RequestBody List<Long> skuIds);

    /**
     * 根据skuId获取skuInfo信息以及skuAttr信息
     * @return
     */
    @ResponseBody
    @GetMapping("/product/skuinfo/infoAndAttr/{skuId}")
    R infoAndAttr(@PathVariable("skuId") Long skuId);
}
